package com.ocn.li.scmdy.modules.app.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@org.hibernate.annotations.Table(comment = "网格员", appliesTo = "map_grid_person")
@Table(name = "map_grid_person")
public class GridPerson extends Base {

	private static final long serialVersionUID = 1L;
	
	private String accountId; //账号id
	private String gridId;  //网格id
	//private String name; //网格员姓名
	//private String gender; //性别
	private String personCode; //网格员编号
	//private String identity; //身份证
	private Integer isleader; //是否是网格长
	private String phone; //网格员电话
	private String mobilePhone; //网格员手机
	private String street; //所属街道
	private String state; //状态
	private Double x; //在地图上的坐标x
	private Double y;
	private Integer mapId; // 标对应地图
	private String attachment;
	private String cityCode;//城市编码
	private String countryCode;//区县编码
	private String townCode;//镇区编码
	private String villageCode;//乡村编码
	private String gridCode;//网格编码
	

	@Column(length = 36)
	@FieldInfo(comment = "账号id")
	public String getAccountId() {
		return accountId;
	}
	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	
	@Column(length = 36)
	@FieldInfo(comment = "网格id")
	public String getGridId() {
		return gridId;
	}
	public void setGridId(String gridId) {
		this.gridId = gridId;
	}
	
	@Column(length = 20)
	@FieldInfo(comment = "网格员编号")
	public String getPersonCode() {
		return personCode;
	}
	public void setPersonCode(String personCode) {
		this.personCode = personCode;
	}

	@Column
	@FieldInfo(comment = "是否是网格长")
	public Integer getIsleader() {
		return isleader;
	}
	public void setIsleader(Integer isleader) {
		this.isleader = isleader;
	}
	
	@Column(length = 20)
	@FieldInfo(comment = "网格员电话")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(length = 20)
	@FieldInfo(comment = "网格员手机")
	public String getMobilePhone() {
		return mobilePhone;
	}
	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	@Column(length = 100)
	@FieldInfo(comment = "所属街道")
	public String getStreet() {
		return street;
	}
	public void setStreet(String street) {
		this.street = street;
	}

	@Column(length = 50)
	@FieldInfo(comment = "状态")
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}

	//@Column(nullable=false)
	@FieldInfo(comment = "在地图上的坐标x")
	public Double getX() {
		return x;
	}
	public void setX(Double x) {
		this.x = x;
	}

	//@Column(nullable=false)
	@FieldInfo(comment = "在地图上的坐标y")
	public Double getY() {
		return y;
	}
	public void setY(Double y) {
		this.y = y;
	}

	@Column(name = "mapId")
	@FieldInfo(comment = " 标对应地图")
	public Integer getMapId() {
		return mapId;
	}
	public void setMapId(Integer mapId) {
		this.mapId = mapId;
	}

	@Transient
	@FieldInfo(comment = "附件相对路径")
	public String getAttachment() {
		return attachment;
	}
	public void setAttachment(String attachment) {
		this.attachment = attachment;
	}

	@Column(name = "city_code", length = 50)
	@FieldInfo(comment = "城市码")
	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}
	@Column(name = "country_code", length = 50)
	@FieldInfo(comment = "区县码")
	public String getCountryCode() {
		return countryCode;
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}
	@Column(name = "town_code", length = 50)
	@FieldInfo(comment = "镇区码")
	public String getTownCode() {
		return townCode;
	}

	public void setTownCode(String townCode) {
		this.townCode = townCode;
	}
	@Column(name = "village_code", length = 50)
	@FieldInfo(comment = "乡村码")
	public String getVillageCode() {
		return villageCode;
	}

	public void setVillageCode(String villageCode) {
		this.villageCode = villageCode;
	}
	@Column(name = "grid_code", length = 50)
	@FieldInfo(comment = "网格码")
	public String getGridCode() {
		return gridCode;
	}
	public void setGridCode(String gridCode) {
		this.gridCode = gridCode;
	}
}
